package main
import "fmt"

var ch chan int=make(chan int, 10)

func genId() {
	id:=0;
	for id<20 {
		id++
		ch <- id
	}
	close(ch)
}

func main() {
	go genId()
	for v:= range ch {
		fmt.Println(v)
	}
}
